﻿// -----------------------------------------------------------------------
// <copyright file="AnimalBase.cs" company="Microsoft">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace Cspl.AnimalFight.Lib.Data
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    public abstract class AnimalBase
    {
        #region Protected Fields

        protected bool _hasEscaped;
        protected bool _hasReturned;
        protected bool _isDead;
        protected string _animalName;
        protected int _healthPower;
        protected int _defensePower;
        protected int _attackPower;
        
        #endregion

        #region Properties

        public bool HasEscaped
        {
            get { return _hasEscaped; }
            set { _hasEscaped = value; }
        }

        public bool HasReturned
        {
            get { return _hasReturned; }
            set { _hasReturned = value; }
        }

        public bool IsDead
        {
            get { return _isDead; }
            set { _isDead = value; }
        }

        public string Name
        {
            get { return _animalName; }
            set { _animalName = value; }
        }


        public int HP
        {
            get { return _healthPower; }
            set { _healthPower = value; }
        }

        public int DP
        {
            get { return _defensePower; }
            set { _defensePower = value; }
        }

        public int AP
        {
            get { return _attackPower; }
            set { _attackPower = value; }
        }

        #endregion

        #region Methods

        public virtual void Escape()
        {
            this.HasEscaped = true;
            this.HasReturned = false;
            Console.WriteLine("  The Animal Escaped.\n");
        }

        public virtual void Return()
        {
            this.HasReturned = true;
            this.HasEscaped = false;
            Console.WriteLine("  The Animal Return to the Battlefield.\n");
        }
       
        #endregion
        
    }
}
